<?php
ini_set("display_errors", "on");
 $url = "http://filter.chnedu.com/v2/putdata";
$arr = array(
		array(
			"word"=>"雪狐",
			"version"=>'201601',
			"type" => "1",
			"site" => "0",
			"system" => "0",
			"iswhitelist" => "0",
			"level" => 2,
			"create_time" => "2016-09-06 09:33:39",),
		array(
			"word"=>"huo狐",
			"version"=>'201601',
			"type" => "1",
			"site" => "0",
			"system" => "0",
			"iswhitelist" => "0",
			"level" => 2,
			"create_time" => "2016-09-06 09:33:39",),
);
$jsonstr1 = json_encode($arr);
$jsonstr2 = '{"words":'.$jsonstr1.'}';
echo $jsonstr2;
//exit;

$ch = curl_init('http://filter.chnedu.com/v2/putdata');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,$jsonstr2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($jsonstr2))
);
 $result = json_decode(curl_exec($ch),true);
 //$result = curl_exec($ch);
var_dump($result);
// var_dump($ch);
	
	
